import React,{Component} from 'react'
import CommentItem from './CommentItem'

class CommentList extends Component {
  static defaultProps = {
    item: []
  }
  render() {
    let arr = []
    let index = 0
    for (let item of this.props.items) {
      index++
      arr.push(
        <CommentItem  item={item} key={index}/>
      )
    }
    return (
      <div className="comm-list">
        {arr}
      </div>
    )
  }
}

export default CommentList